#include "udpMessageQueue.h"

UDPMessageQueue::UDPMessageQueue()
{

}

UDPMessageQueue::~UDPMessageQueue()
{

}

void UDPMessageQueue::push( const UDPMessage &message )
{
	MutexLocker lock( queueMutex_ );
	queue_.push_back( message );
	queueCount_.post();
}

UDPMessage UDPMessageQueue::pop()
{
	UDPMessage m;
	MutexLocker lock( queueMutex_ );
	queueCount_.wait();
	m = queue_[0];
	queue_.pop_front();
	return m;
}
